;(function(){
    const template= `        
    <tr>
        <td>{{emp.id}}</td>
        <td>{{emp.name}}</td>
        <td>{{emp.age}}</td>
        <td><a href="#" @click="deleteItem">删除</a></td>
    </tr>`
    window.Items={
        template:template,
        props:{ 
            emp:{
                type:Object,
                required:true,
            },
            deleteEmp:Function,
            index:Number,
        },
        methods: {
          deleteItem(){
              this.deleteEmp(this.index);
          }  
        },
    }
})()